package com.tsky.casing;

import java.util.List;

/**
 * Bean，组合查询Bean
 * 
 * @author: cainiao
 * @version 1.0
 * @time: 2010-4-21 下午02:45:56
 */
public class QueryBean {

	/* 查询条件 */
	private int page;// 当前页
	private int rows;// 分页大小
	private String sort;// 参与排序字段
	private String order;// 升降序
	private String status; // 状态
	private String versionid;

	/* 返回结果 */
	private long total;// 总记录数
	private List<?> dataList;// 当前数据集合

	/**
	 * 
	 * @author：cainiao
	 * @方法描述：获取分页开始位置
	 * @date: 2011-3-15
	 * @return
	 */
	public int getFirstResult(){
		return rows * (page - 1);
	}
	
	public int getPage() {
		return page;
	}

	public void setPage(int page) {
		this.page = page;
	}

	public int getRows() {
		return rows;
	}

	public void setRows(int rows) {
		this.rows = rows;
	}

	public String getSort() {
		return sort;
	}

	public void setSort(String sort) {
		this.sort = sort;
	}

	public String getOrder() {
		return order;
	}

	public void setOrder(String order) {
		this.order = order;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public long getTotal() {
		return total;
	}

	public void setTotal(long total) {
		this.total = total;
	}

	public List<?> getDataList() {
		return dataList;
	}

	public void setDataList(List<?> dataList) {
		this.dataList = dataList;
	}

	public String getVersionid() {
		return versionid;
	}

	public void setVersionid(String versionid) {
		this.versionid = versionid;
	}

}
